package Day01;

import org.omg.CORBA.PUBLIC_MEMBER;

public class Demo02 {

	public static void main(String[] args) {
		int [] arr= {1,2,3,4,5,6};
		int abc = getabc(arr);
	
		System.out.println(abc);
		System.out.println(abc);
		
	}

	public static int getabc(int[] arr) {
			int max = arr[0];

			for (int i = 0; i < arr.length; i++) {
				if (arr[i] > max) {
					max = arr[i];
				}
			}
			
   
    	int min = arr[0];
    	
    	for (int i = 0; i < arr.length; i++) {
			if(min>arr[i]) {
				min=arr[i];
			}
		}
    }
    	int[] abc= {max,min};
    	
			
			return abc;
				
	}

}
